CUDA_HOME = /usr/local/cuda
CUDA_SDK_HOME = /home/mian/NVIDIA_GPU_Computing_SDK

CXX = g++
INCLUDE = -I$(CUDA_HOME)/include -I../common -I../gsnp -I../gsnp/cpp -I../galigner -I../gama -I../container
LFLAGS = -L$(CUDA_HOME)/lib64 -L$(CUDA_SDK_HOME)/C/lib -L../galigner -L../gsnp -L../gama -L../container -lcuda -lcudart -lcutil_x86_64 -lgsnp -lcontainer -lcmat
CXXFLAGS = -g -O3 $(INCLUDE)

TARGET = gallop
SOURCE = $(wildcard *.cpp)
OBJS = $(patsubst %.cpp, %.o, $(SOURCE))


#%.o : %.cpp
#	$(CXX) -c $< -o $@
%.o : %.cpp %.h
	$(CXX) -c $(CXXFLAGS) $< -o $@
$(TARGET): $(OBJS)
	$(CXX) $^ -o $@ $(CXXFLAGS) $(LFLAGS)

.PHONY:clean
clean:
	$(RM) $(TARGET) $(OBJS)
